package org.vectrics.recruiter.struts.admin;


import org.vectrics.hibernate.ThreadProperties;
import org.vectrics.provider.CoreServiceLocator;
import org.vectrics.struts.Request;
import org.vectrics.user.web.struts.UserProfileForm;

/**
 * @author mmoore
 */
public class AdminPersonProfileForm extends UserProfileForm {
	public static final long serialVersionUID = 88845772372124L;

	protected void onError(Request request) {
	}
	
	
	protected boolean getPasswordRequired() {
		return false;
	}

	protected boolean getCompanyRequired() {
		if (this.getNewPerson() == null)
			return false;
		else
			return(this.getNewPerson().equals("true"));
	}
	
	protected boolean getNewUserNameRequired() {
		return false;
	}

	protected boolean getUserNameRequired() {
		return false;
	}

	protected boolean getNameRequired() {
		return true;
	}

	protected boolean getEmailRequired() {
		boolean emailRequired = CoreServiceLocator.getConfiguration().getRequireEmailForPersonEdit(ThreadProperties.getDomain());
		return(emailRequired);
	}
	
	protected boolean getPasswordHintRequired() {
		return(false);
	}

	protected boolean getLocationRequired() {
		return true;
	}
}
